package com.moody.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.ui.Model;

import com.moody.hibernate.domain.CodeLib;
import com.moody.hibernate.domain.MainscaleHis;
import com.moody.hibernate.domain.MainscaleInfo;
import com.moody.hibernate.domain.ModelHis;
import com.moody.hibernate.domain.ModelInfo;
import com.moody.hibernate.domain.ModelLevel;


/*
 * Copyright © Moody analytics
 *
 * @Author: Wang Fuqiang
 * @Time: 2011-11-28 下午01:59:15
 * @Modified by: 
 * @Description: 
 */
@Service
public interface ModelService {
	List<ModelHis> findModelHis();

	void deleteModel(String modelId);

	List<ModelHis> findNotReleasedModelHis();

	List<ModelHis> findNonNotReleasedModelHis();

	ModelHis findModelHisById(String id);

	void updateModelHis(ModelHis model);


	ModelHis findModelByKind1AndKind2AndState(String kind1, String kind2, String state);

	boolean findModelByKind1AndKind2AndVersion(String kind1, String kind2,
			String version);

	void insertModel(ModelHis model);

	List<ModelInfo> findModelInfoByModelIdAndDataFlag(String modelId,String dataFlag);

	void insertModelInfo(List<ModelInfo> list);

	List<ModelInfo> findModelInfoByModelIdAndDescribe2AndDataFlagAndModifiedField(
			String modelId, String describe2, String dataFlag, String field, String value);

	void updateModelInfo(ModelInfo mi);

	List<ModelLevel> findModelLevelByModelId(String modelId);

	void insertModelInfo(ModelInfo modelInfo);

	List<ModelInfo> findModelInfoByModelIdAndDescribe2AndDataFlag(String modelId,
			String describe2, String dataFlag, String field);

	void insertModelLevel(List<ModelLevel> list);

	List<MainscaleHis> findNotReleasedMainScale();

	List<MainscaleHis> findNonNotReleasedMainScale();

	MainscaleHis findMainscaleHisById(String mainScaleId);

	MainscaleHis findMainscaleByState(String mainScaleState);

	void updateMainscaleHis(MainscaleHis mainScaleHis);

	List<MainscaleInfo> findMainscaleInfoByMainscaleId(String mainScaleId);

	void insertMainScaleInfo(List<MainscaleInfo> list);

	List<ModelInfo> findModelInfoByModelId(String modelId);

	void deleteModelInfo(List<ModelInfo> nowList);

	List<MainscaleHis> findMainScaleByVersionAndName(String version, String name);

	void insertMainscale(MainscaleHis mainscale);

	MainscaleInfo findMainscaleInfoById(String serialNo);
	
	void updateMainscaleInfo(MainscaleInfo mainscaleInfo);

	List<ModelHis> findEffectedModelHis();

	ModelInfo findModelInfoById(String serialNo);

	void updateCodeLib(List<CodeLib> list);


	//List<MainscaleInfo> findMainscaleInfoByState(String effected);
}
